op {
  graph_op_name: "UniformQuantizedDot"
  visibility: HIDDEN
  in_arg {
    name: "lhs"
    description: <<END
Must be a 2D Tensor of Tin.
END
  }
  in_arg {
    name: "rhs"
    description: <<END
Must be a 2D Tensor of Tin.
END
  }
  in_arg {
    name: "lhs_scales"
    description: <<END
The float value(s) used as scale when quantizing original data that lhs represents.
Must be a scalar Tensor (lhs supports only per-tensor quantization).
END
  }
  in_arg {
    name: "lhs_zero_points"
    description: <<END
The int32 value(s) used as zero_point when quantizing original data that lhs represents.
Same shape condition as lhs_scales.
END
  }
  in_arg {
    name: "rhs_scales"
    description: <<END
The float value(s) used as scale when quantizing original data that rhs represents.
Must be a scalar Tensor (per-tensor quantization) or 1D Tensor of size (rhs.dim_size(1),) (per-channel quantization).
END
  }
  in_arg {
    name: "rhs_zero_points"
    description: <<END
The int32 value(s) used as zero_point when quantizing original data that rhs represents.
Same shape condition as rhs_scales.
END
  }
  in_arg {
    name: "output_scales"
    description: <<END
The float value(s) to use as scales when quantizing original data that output represents.
Must be a scalar Tensor (per-tensor quantization) or 1D Tensor of size (output.dim_size(1),) (per-channel quantization).
If rhs is per-tensor quantized, output must be also per-tensor quantized.
This means that if rhs_scales and rhs_zero_points are scalar Tensors, output_scales and output_zero_points must be scalar Tensors as well.
END
  }
  in_arg {
    name: "output_zero_points"
    description: <<END
The int32 value(s) used as zero_point when quantizing original data that output represents.
Same shape condition as rhs_scales.
END
  }
  out_arg {
    name: "output"
    description: <<END
The output 2D Tensor of Tout, whose shape is (lhs.dim_size(0), rhs.dim_size(1)).
END
  }
  attr {
    name: "Tin"
    description: <<END
The type of lhs and rhs input Tensor.
END
  }
  attr {
    name: "Tout"
    description: <<END
The type of output Tensor.
END
  }
  attr {
    name: "lhs_quantization_axis"
    description: <<END
Indicates the dimension index of the tensor where per-axis quantization is applied for the slices along that dimension.
If set to -1 (default), this indicates per-tensor quantization.
For dot op lhs, only per-tensor quantization is supported.
Thus, this attribute must be set to -1. Other values are rejected.
END
  }
  attr {
    name: "lhs_quantization_min_val"
    description: <<END
The min value of the quantized data stored in lhs.
For example, if Tin is qint8, this must be set to -127 if narrow range quantized or -128 if not.
END
  }
  attr {
    name: "lhs_quantization_max_val"
    description: <<END
The max value of the quantized data stored in rhs.
For example, if Tin is qint8, this must be set to 127.
END
  }
  attr {
    name: "rhs_quantization_axis"
    description: <<END
Indicates the dimension index of the tensor where per-axis quantization is applied for the slices along that dimension.
If set to -1 (default), this indicates per-tensor quantization.
For dot op rhs, only per-tensor quantization or per-channel quantization along dimension 1 is supported.
Thus, this attribute must be set to -1 or 1. Other values are rejected.
END
  }
  attr {
    name: "rhs_quantization_min_val"
    description: <<END
The min value of the quantized data stored in rhs.
For example, if Trhs is qint8, this must be set to -127 if narrow range quantized or -128 if not.
END
  }
  attr {
    name: "rhs_quantization_max_val"
    description: <<END
The max value of the quantized data stored in rhs.
For example, if Trhs is qint8, this must be set to 127.
END
  }
  attr {
    name: "output_quantization_axis"
    description: <<END
Indicates the dimension index of the tensor where per-axis quantization is applied for the slices along that dimension.
If set to -1 (default), this indicates per-tensor quantization.
For dot op output, only per-tensor quantization or per-channel quantization along dimension 1 is supported.
Thus, this attribute must be set to -1 or 1. Other values are rejected.
END
  }
  attr {
    name: "output_quantization_min_val"
    description: <<END
The min value of the quantized data stored in output.
For example, if Tout is qint8, this must be set to -127 if narrow range quantized or -128 if not.
END
  }
  attr {
    name: "output_quantization_max_val"
    description: <<END
The max value of the quantized data stored in output.
For example, if Tout is qint8, this must be set to 127.
END
  }
  summary: "Perform quantized dot of quantized Tensor `lhs` and quantized Tensor `rhs` to make quantized `output`."
  description: <<END
Given quantized `lhs` and quantized `rhs`, performs quantized dot on `lhs` and `rhs` to make quantized `output`.
`lhs` and `rhs` must be 2D Tensors and the lhs.dim_size(1) must match rhs.dim_size(0).
`lhs` and `rhs` must be quantized Tensor, where data value is quantized using the formula:
quantized_data = clip(original_data / scale + zero_point, quantization_min_val, quantization_max_val).
`output` is also quantized, using the same formula.
If `rhs` is per-tensor quantized, `output` must be also per-tensor quantized.
END
}
